<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
		<meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
		<title>学生岗位轨迹列表</title>
		<link rel="stylesheet" type="text/css" href="../../css/api.css"/>
		<link rel="stylesheet" href="../../css/mui.min.css" />
		<link rel="stylesheet" href="../../css/base.css"/>
		<style>
			html, body {
				background-color: #f3f5f7;
			}
			.divbackgroundImg {
				background: url(../../image/bg_practice_stu_guiji.png) no-repeat;
				width: 75%;
				/*height: 90px;*/
				background-size: 100% 100%;
				padding-left: 26px;
				padding-right: 10px;
				padding-top: 10px;
				margin-right: 20px;
				padding-bottom: 10px;
				position: absolute;
				right: 0px;
			}
			span {
				display: block;
				line-height: 22px;
			}
			.base_black_grey {
			}
			.left-img {
				width: 40px;
			}
			.left-div {
				top: 18px;
				left: 20px;
				position: absolute;
			}
			.divstyle {
				position: relative;
				margin-top: 10px;
				height: 80px;
			}
			/**虚线*/
			.linedashedstyle {
				height: 51px;
				position: absolute;
				left: 18px;
				top: -50px;
				border: dashed #d9d9d9;
				border-width: 1px;
			}
			.linesolidstyle {
				height: 51px;
				position: absolute;
				left: 18px;
				border: solid #d9d9d9;
				top: -50px;
			}
			.blue_color {
				color: #18b4ed;
			}
			.span-inline-block {
				display: inline-block;
			}
			.em-duigou-style {
				background-size: 16px;
				background-image: url(../../image/icon_guij_duigou.png);
				background-position: center right;
				background-repeat: no-repeat;
				padding-left: 15px;
				padding-right: 22px;
			}
			.coloryellow {
				border: solid #FFC51E;
				border-width: 1px;
			}
			.colorblue {
				border: solid #18b4ed;
				border-width: 1px;
			}
			.colorsilver {
				border: solid #A3A5CD;
				border-width: 1px;
			}
			.font_color {
				color: #18b4ed;
			}
			.competition-top-tag {
				background-size: 20px;
				background-image: url(../../image/icon_guij_infon.png);
				background-position: center left;
				background-repeat: no-repeat;
				padding-left: 30px;
				font-size: 14px;
				color: #000000;
				line-height: 40px;
				margin-left: 15px;
			}
			#infoid {
				margin-right: 15px;
				margin-left: 15px;
				font-size: 14px;
				color: #222222;
			}
		</style>
	</head>
	<body>
		<div id='mian'>
			<div  id="divlist" >
				<!--<div class="divstyle " onclick="itemclick(0)" >
					<div class="left-div"><img src="../../image/icon_no_start.png"  class="left-img"/>
					</div>
					<div class="divbackgroundImg  ">
						<span class="base_content_font base_dark_grey_shallow">中华人民共和国国家主席</span><span class="base_tag_font base_dark_grey_shallow">2018-05-13 到2018-05-15 </span><span class="base_content_font base_dark_grey_shallow">查看详情</span>
					</div>
				</div>
				<div class="divstyle " onclick="itemclick(1)" >
					<div class="left-div"><img src="../../image/icon_no_start.png"  class="left-img"/><div class="linedashedstyle"></div>
					
				</div>
				<div class="divbackgroundImg  ">
					<span class="base_content_font base_dark_grey_shallow">仓储管理</span><span class="base_tag_font base_dark_grey_shallow">2018-05-09 到2018-05-12 </span><span class="base_content_font base_dark_grey_shallow">查看详情</span>
				</div>
			</div>
			<div class="divstyle " onclick="itemclick(2)" >
				<div class="left-div"><img src="../../image/icon_no_start.png"  class="left-img"/><div class="linedashedstyle"></div>
				</div>
			</div>
			<div class="divbackgroundImg  ">
				<span class="base_content_font base_dark_grey_shallow">仓储管理</span><span class="base_tag_font base_dark_grey_shallow">2018-05-09 到2018-05-12 </span><span class="base_content_font base_dark_grey_shallow">查看详情</span>
			</div>
		</div>
		<div class="divstyle " onclick="itemclick(3)" >
			<div class="left-div"><img src="../../image/icon_first_round.png"  class="left-img"/><div class="linesolidstyle  coloryellow"></div>
			</div>
			<div class="divbackgroundImg  ">
				<span class="base_content_font span-inline-block base_black_grey">实习岗位</span><span class="base_tag_font base_dark_grey_shallow">2018-05-04 到2018-05-08 </span><span class="base_content_font font_color ">查看详情</span>
			</div>
		</div>-->
		<!--<div class="divstyle " onclick="itemclick(0)" >
		<div class="left-div"><img src="../../image/icon_no_start.png"  class="left-img"/>
		</div>
		<div class="divbackgroundImg  ">
		<span class="base_content_font base_dark_grey_shallow">测试</span><span class="base_tag_font base_dark_grey_shallow">2018-05-11 到2018-05-15 </span><span class="base_content_font base_dark_grey_shallow">查看详情</span>
		</div>
		</div>
		<div class="divstyle " onclick="itemclick(1)" >
		<div class="left-div"><img src="../../image/icon_no_start.png"  class="left-img"/><div class="linedashedstyle"></div>
		</div>
		</div>
		<div class="divbackgroundImg  ">
		<span class="base_content_font base_dark_grey_shallow">仓储管理员</span><span class="base_tag_font base_dark_grey_shallow">2018-05-08 到2018-05-10 </span><span class="base_content_font base_dark_grey_shallow">查看详情</span>
		</div></div>
		<div class="divstyle " onclick="itemclick(2)" >
		<div class="left-div"><img src="../../image/icon_first_round_ing.png"  class="left-img"/><div class="linesolidstyle  coloryellow"></div>
		</div>
		<div class="divbackgroundImg  ">
		<span class="base_content_font base_dark_grey_shallow">实习岗位</span><span class="base_tag_font base_dark_grey_shallow">2018-05-04 到2018-05-07 </span><span class="base_content_font font_color ">查看详情</span>
		</div>
		</div>-->
		<!--<div class="divstyle ">
		<div class="left-div">
		<img src="../../image/icon_first_round.png"  class="left-img"/>
		</div>
		<div class="divbackgroundImg  ">
		<span class="base_content_font base_dark_grey_shallow">售货员 </span>
		<span class="base_tag_font base_dark_grey_shallow"> 2018-09-05到2018-10-01</span>
		<span class="base_content_font base_dark_grey_shallow">查看详情</span>
		</div>
		</div>
		<div class="divstyle ">
		<div class=" left-div">
		<div class="linesolidstyle  coloryellow"></div>
		<img src="../../image/icon_three_round_ing.png"  class="left-img "/>
		</div>
		<div class="divbackgroundImg left ">
		<span class="base_content_font span-inline-block base_black_grey">售货员</span><em class="base_content_font base_dark_grey_shallow em-duigou-style"> Get</em>
		<span class="base_tag_font base_dark_grey_shallow"> 2018-09-05到2018-10-01</span>
		<span class="base_content_font base_dark_grey font_color ">查看详情</span>
		</div>
		</div>
		<div class="divstyle ">
		<div class=" left-div">
		<div class="linedashedstyle  colorsilver"></div>
		<img src="../../image/icon_second_round_ing.png"  class="left-img"/>
		</div>
		<div class="divbackgroundImg left ">
		<span class="base_content_font span-inline-block base_black_grey">售货员</span>
		<span class="base_tag_font base_dark_grey_shallow"> 2018-09-05到2018-10-01</span>
		<span class="base_content_font base_dark_grey font_color ">查看详情</span>
		</div>-->
		</div>
		</div> <!--<div class="competition-top-tag"> 说明</div>
		<div class="div_divider"></div>
		<span id="infoid">
		说明文字说明文字说明文字说明文字说明文字说明文字
		</span>-->
		<div class="noSign" hidden="hidden" id="noData">
			<img src="../../image/icon_img.png" width="60%">
			<p class="font16 top_15 base_dark_grey" >
				暂无数据
			</p>
		</div>
		<div class="loadFailure" hidden="hidden" id="noNet">
			<img src="../../image/icon_img01.png" width="60%">
			<p class="" >
				数据加载失败
			</p>
			<p>
				请检查您的网络
			</p>
			<button type="button"  onclick="loadData()"class="mui-btn mui-btn-outlined">
				重新加载
			</button>
		</div>
	</body>
	<script type="text/javascript" src="../../script/api.js"></script>
	<script type="text/javascript" src="../../script/MD5.js"></script>
	<script src="../../script/jquery.min.js" type="text/javascript"></script>
	<script type="text/javascript" src="../../script/requestTool.js"></script>
	<script src="../../script/common.js"></script>
	<script type="text/javascript">
		var page = 1;
		var row = 10;
		var refreshCount = 0;
		var pageParam = '';
		var students = '';
		//新请求到的数据条数
		apiready = function() {
			loadNewData();
			if (api.pageParam.hasOwnProperty('type') && api.pageParam.type == 0) {//师傅端徒弟列表跳转而来
				sendBuriedNotifi('0', '徒弟实习轨迹页', '239');
			} else {
				sendBuriedNotifi('0', '学生实习轨迹页', '223');
			}
		}
		function sendBuriedNotifi(busionessid, pagetype, pagetypeid) {
			var userinfo = {
				uid : $api.getStorage('cfnetppuid'),
				jid : $api.getStorage('cfnetppjid'),
				uname : $api.getStorage('cfnetppusername'),
			}
			var data = {
				busionessid : busionessid,
				pagetype : pagetype,
				pagetypeid : pagetypeid,
				sourceurl : api.pageParam.sourceurl,
				sourcetitle : api.pageParam.sourcetitle,
				accesspageurl : window.location.pathname,
				accesspagetitle : document.title,
				userinfo : userinfo
			}
			SendBehaviorTrajectoriesNotifi_Study(data);
		}

		//获取班级学生列表
		function loadData() {
			showProgress();
			pageParam = api.pageParam;
			var params = {
				jid : $api.getStorage('cfnetppjid'),
				uid : api.pageParam.uid,
			};
			//										alert(JSON.stringify(params));
			cfnetppPOST(url_getStudentTrajectory, params, true, function(data, status) {
				//												alert(JSON.stringify(data));
				api.hideProgress();
				if (status == 'success') {
					if (data.code == 200) {
						students = data.data;
						//						refreshCount = students.length;
						if (students != '' && students.constructor == Array && students.length > 0) {
							$('#noData').hide();
							$('#noNet').hide();
							$('#mian').show();
							writelist(students, students.length);
						} else {
							$('#noData').show();
							$('#noNet').hide();
						}
					} else if (data.code = 108) {
						$('#noData').show();
						$('#noNet').hide();
						$('#mian').hide();
					} else {
						$('#noData').show();
						$('#noNet').hide();
						$('#mian').hide();
					}
				} else {
					$('#noData').hide();
					$('#noNet').show();
					$('#mian').hide();
				}
			});
		}

		function writelist(quar_list, len) {
			var strhtml = '';
			for (var i = 0; i < len; i++) {
				data = quar_list[i];
				var imghtml = '';
				var detailsHtml = '<span class="base_content_font font_color ">查看详情</span>';
				var namehtml = '<span class="base_content_font base_dark_grey_shallow">' + data.titles + '</span>';
				if (data.gwtype == 1) {//第一阶段
					if (data.status == 3) {//通过
						imghtml = '<img src="../../image/icon_first_round.png"  class="left-img"/>';
						namehtml = '<span class="base_content_font span-inline-block base_black_grey">' + data.titles + '</span><em class="base_content_font base_dark_grey_shallow em-duigou-style"> Get</em>'
						if (i != 0) {
							imghtml = imghtml + '<div class="linesolidstyle  coloryellow"></div>';
						}
					} else if (data.status == 4) {//未通过
						imghtml = '<img src="../../image/icon_first_round.png"  class="left-img"/>';
						namehtml = '<span class="base_content_font span-inline-block base_black_grey">' + data.titles + '</span>'
						if (i != 0) {
							imghtml = imghtml + '<div class="linesolidstyle  coloryellow"></div>';
						}
					} else if (data.status == 0) {//未开始
						imghtml = '<img src="../../image/icon_no_start.png"  class="left-img"/>';
						detailsHtml = '<span class="base_content_font base_dark_grey_shallow">查看详情</span>';
						if (i != 0) {
							imghtml = imghtml + '<div class="linedashedstyle"></div>';
						}
					} else {
						imghtml = '<img src="../../image/icon_first_round_ing.png"  class="left-img"/>';
						if (i != 0) {
							imghtml = imghtml + '<div class="linesolidstyle  coloryellow"></div>';
						}
						if (i != 0) {
							imghtml = imghtml + '<div class="linesolidstyle  coloryellow"></div>';
						}
					}
				} else if (data.gwtype == 2) {//第2阶段
					if (data.status == 3) {
						imghtml = '<img src="../../image/icon_second_round.png"  class="left-img"/><div class="linesolidstyle  colorsilver"></div>';
						namehtml = '<span class="base_content_font span-inline-block base_black_grey">' + data.titles + '</span><em class="base_content_font base_dark_grey_shallow em-duigou-style"> Get</em>'
						if (i != 0) {
							imghtml = imghtml + '<div class="linesolidstyle  colorsilver"></div>';
						}
					} else if (data.status == 4) {
						imghtml = '<img src="../../image/icon_second_round.png"  class="left-img"/><div class="linesolidstyle  colorsilver"></div>';
						namehtml = '<span class="base_content_font span-inline-block base_black_grey">' + data.titles + '</span>'
						if (i != 0) {
							imghtml = imghtml + '<div class="linesolidstyle  colorsilver"></div>';
						}
					} else if (data.status == 0) {//未开始
						imghtml = '<img src="../../image/icon_no_start.png"  class="left-img"/>';
						detailsHtml = '<span class="base_content_font base_dark_grey_shallow">查看详情</span>';
						if (i != 0) {
							imghtml = imghtml + '<div class="linedashedstyle"></div>';
						}
					} else {
						imghtml = '<img src="../../image/icon_second_round_ing.png"  class="left-img"/>';
						if (i != 0) {
							imghtml = imghtml + '<div class="linesolidstyle  colorsilver"></div>';
						}
					}
				} else if (data.gwtype == 3) {//第3阶段
					if (data.status == 3) {
						imghtml = '<img src="../../image/icon_three_round.png"  class="left-img"/>';
						namehtml = '<span class="base_content_font span-inline-block base_black_grey">' + data.titles + '</span><em class="base_content_font base_dark_grey_shallow em-duigou-style"> Get</em>'
						if (i != 0) {
							imghtml = imghtml + '<div class="linesolidstyle  colorblue"></div>';
						}
					} else if (data.status == 4) {
						imghtml = '<img src="../../image/icon_three_round.png"  class="left-img"/>';
						namehtml = '<span class="base_content_font span-inline-block base_black_grey">' + data.titles + '</span>'
						if (i != 0) {
							imghtml = imghtml + '<div class="linesolidstyle  colorblue"></div>';
						}
					} else if (data.status == 0) {//未开始
						imghtml = '<img src="../../image/icon_no_start.png"  class="left-img"/>';
						detailsHtml = '<span class="base_content_font base_dark_grey_shallow">查看详情</span>';
						if (i != 0) {
							imghtml = imghtml + '<div class="linedashedstyle"></div>';
						}
					} else {
						imghtml = '<img src="../../image/icon_three_round_ing.png"  class="left-img"/>';
						if (i != 0) {
							imghtml = imghtml + '<div class="linesolidstyle  colorblue"></div>';
						}
					}
				}
				var str = '	<div class="divstyle " onclick="itemclick(' + i + ')" >' + '<div class="left-div">' + imghtml + '</div>' + '<div class="divbackgroundImg  ">' + namehtml + '<span class="base_tag_font base_dark_grey_shallow">' + getCurrentDay(data.starttime) + '到' + getCurrentDay(data.endtime) + '</span>' + detailsHtml + '</div>' + '</div>';
				strhtml = strhtml + str;
			}
//			console.log(strhtml);
			$('#divlist').html(strhtml);
		}

		function itemclick(i) {
			var type = 0;
			var status = students[i].status;
			if (status == 3 || status == 4) {//评分过
				type = 1;
			}
			var pageParam = {
				id : students[i].id,
				gwid : students[i].gwid,
				type : type,
				title : students[i].titles,
				uid : api.pageParam.uid,
				sourceurl : window.location.pathname,
				sourcetitle : document.title,
				open_type : api.pageParam.type
			}
			api.openWin({useWKWebView:true,
				name : 'position _details_wind',
				url : 'PositionDetailsWind.html',
				pageParam : pageParam
			});
		}

		function sendBuriedNotifi(busionessid, pagetype, pagetypeid) {
			var userinfo = {
				uid : $api.getStorage('cfnetppuid'),
				jid : $api.getStorage('cfnetppjid'),
				uname : $api.getStorage('cfnetppusername'),
			}
			var data = {
				busionessid : busionessid,
				pagetype : pagetype,
				pagetypeid : pagetypeid,
				sourceurl : api.pageParam.sourceurl,
				sourcetitle : api.pageParam.sourcetitle,
				accesspageurl : window.location.pathname,
				accesspagetitle : document.title,
				userinfo : userinfo
			}
			SendBehaviorTrajectoriesNotifi_Study(data);
		}
	</script>
</html>